package com.yuw.oophomework6;

public class ComputerStudent extends Student {
    private Double optScore;
    private Double writtenEnglisScore;


    @Override
    public Double calculateCourseScore() {
        Double score = null;

        score = MyUtils.getDaulbeValue(this.getOptScore()) * 0.4
                + MyUtils.getDaulbeValue(this.getWrittenEnglisScore()) * 0.2
                + MyUtils.getDaulbeValue(this.getMiddleScore()) * 0.2
                + MyUtils.getDaulbeValue(this.getMiddleScore()) * 0.2;

        return score == 0.0 ? null : score;
    }

    public Double getOptScore() {
        return optScore;
    }

    public void setOptScore(Double optScore) {
        this.optScore = optScore;
    }

    public Double getWrittenEnglisScore() {
        return writtenEnglisScore;
    }

    public void setWrittenEnglisScore(Double writtenEnglisScore) {
        this.writtenEnglisScore = writtenEnglisScore;
    }


}
